<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:t="http://myfaces.apache.org/tomahawk">
<body>
<ui:composition template="../template/adminTemplate.jsp">
	<ui:define name="title">
		Data Upload
	</ui:define>
	<ui:define name="body">
		<h:messages layout="table" styleClass="error" />
		<h:form enctype="multipart/form-data">
			<h:panelGrid columns="2">
				<h:outputText value="trip" />
				<h:selectOneMenu value="#{fileBean.tripId}">
					<f:selectItems value="#{listTripBacking.allTripsOptions}" />
				</h:selectOneMenu>
	
				<h:outputText value="data file" />
				<t:inputFileUpload value="#{fileBean.file}" />
				
				<h:outputText value="start date" rendered="#{fileBean.timeRequired}" />
				<t:inputDate value="#{fileBean.startDate}" id="startDate"
					popupCalendar="true" type="both" rendered="#{fileBean.timeRequired}" />
				

					<h:commandButton action="#{uploadFileBacking.saveFile}" value="Upload" rendered="#{!fileBean.timeRequired}" />
					<h:commandButton action="#{uploadFileBacking.saveFileNoTimeStamp}" value="Upload no" rendered="#{fileBean.timeRequired}" />
		
			</h:panelGrid>
		</h:form>
	</ui:define>
</ui:composition>
</body>
</html>